3.922 \(\int \frac{(a+b x)^n (c+d x)}{x^2} \, dx\)

Optimal. Leaf size=62 \[ -\frac{(a+b x)^{n+1} (a d+b c n) \, _2F_1\left (1,n+1;n+2;\frac{b x}{a}+1\right )}{a^2 (n+1)}-\frac{c (a+b x)^{n+1}}{a x} \]

[Out]

-((c*(a + b*x)^(1 + n))/(a*x)) - ((a*d + b*c*n)*(a + b*x)^(1 + n)*Hypergeometric2F1[1, 1 + n, 2 + n, 1 + (b*x)
/a])/(a^2*(1 + n))

________________________________________________________________________________________

Rubi [A]  time = 0.0183483, antiderivative size = 62, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.125, Rules used = {78, 65} \[ -\frac{(a+b x)^{n+1} (a d+b c n) \, _2F_1\left (1,n+1;n+2;\frac{b x}{a}+1\right )}{a^2 (n+1)}-\frac{c (a+b x)^{n+1}}{a x} \]

Antiderivative was successfully verified.

[In]

Int[((a + b*x)^n*(c + d*x))/x^2,x]

[Out]

-((c*(a + b*x)^(1 + n))/(a*x)) - ((a*d + b*c*n)*(a + b*x)^(1 + n)*Hypergeometric2F1[1, 1 + n, 2 + n, 1 + (b*x)
/a])/(a^2*(1 + n))

Rule 78

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> -Simp[((b*e - a*f
)*(c + d*x)^(n + 1)*(e + f*x)^(p + 1))/(f*(p + 1)*(c*f - d*e)), x] - Dist[(a*d*f*(n + p + 2) - b*(d*e*(n + 1)
+ c*f*(p + 1)))/(f*(p + 1)*(c*f - d*e)), Int[(c + d*x)^n*(e + f*x)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e, f,
 n}, x] && LtQ[p, -1] && ( !LtQ[n, -1] || IntegerQ[p] ||  !(IntegerQ[n] ||  !(EqQ[e, 0] ||  !(EqQ[c, 0] || LtQ
[p, n]))))

Rule 65

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((c + d*x)^(n + 1)*Hypergeometric2F1[-m, n +
 1, n + 2, 1 + (d*x)/c])/(d*(n + 1)*(-(d/(b*c)))^m), x] /; FreeQ[{b, c, d, m, n}, x] &&  !IntegerQ[n] && (Inte
gerQ[m] || GtQ[-(d/(b*c)), 0])

Rubi steps

\begin{align*} \int \frac{(a+b x)^n (c+d x)}{x^2} \, dx &=-\frac{c (a+b x)^{1+n}}{a x}+\frac{(a d+b c n) \int \frac{(a+b x)^n}{x} \, dx}{a}\\ &=-\frac{c (a+b x)^{1+n}}{a x}-\frac{(a d+b c n) (a+b x)^{1+n} \, _2F_1\left (1,1+n;2+n;1+\frac{b x}{a}\right )}{a^2 (1+n)}\\ \end{align*}

Mathematica [A]  time = 0.0180129, size = 55, normalized size = 0.89 \[ -\frac{(a+b x)^{n+1} \left (x (a d+b c n) \, _2F_1\left (1,n+1;n+2;\frac{b x}{a}+1\right )+a c (n+1)\right )}{a^2 (n+1) x} \]

Antiderivative was successfully verified.

[In]

Integrate[((a + b*x)^n*(c + d*x))/x^2,x]

[Out]

-(((a + b*x)^(1 + n)*(a*c*(1 + n) + (a*d + b*c*n)*x*Hypergeometric2F1[1, 1 + n, 2 + n, 1 + (b*x)/a]))/(a^2*(1
+ n)*x))

________________________________________________________________________________________

Maple [F]  time = 0.029, size = 0, normalized size = 0. \begin{align*} \int{\frac{ \left ( bx+a \right ) ^{n} \left ( dx+c \right ) }{{x}^{2}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x+a)^n*(d*x+c)/x^2,x)

[Out]

int((b*x+a)^n*(d*x+c)/x^2,x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (d x + c\right )}{\left (b x + a\right )}^{n}}{x^{2}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^n*(d*x+c)/x^2,x, algorithm="maxima")

[Out]

integrate((d*x + c)*(b*x + a)^n/x^2, x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{{\left (d x + c\right )}{\left (b x + a\right )}^{n}}{x^{2}}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^n*(d*x+c)/x^2,x, algorithm="fricas")

[Out]

integral((d*x + c)*(b*x + a)^n/x^2, x)

________________________________________________________________________________________

Sympy [B]  time = 8.73961, size = 493, normalized size = 7.95 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)**n*(d*x+c)/x**2,x)

[Out]

b**n*c*n**2*(a/b + x)**n*lerchphi(1 + b*x/a, 1, n + 1)*gamma(n + 1)/(x*gamma(n + 2)) + b**n*c*n*(a/b + x)**n*l
erchphi(1 + b*x/a, 1, n + 1)*gamma(n + 1)/(x*gamma(n + 2)) - b**n*c*n*(a/b + x)**n*gamma(n + 1)/(x*gamma(n + 2
)) - b**n*c*(a/b + x)**n*gamma(n + 1)/(x*gamma(n + 2)) - b**n*d*n*(a/b + x)**n*lerchphi(1 + b*x/a, 1, n + 1)*g
amma(n + 1)/gamma(n + 2) - b**n*d*(a/b + x)**n*lerchphi(1 + b*x/a, 1, n + 1)*gamma(n + 1)/gamma(n + 2) + b*b**
n*c*n**2*(a/b + x)**n*lerchphi(1 + b*x/a, 1, n + 1)*gamma(n + 1)/(a*gamma(n + 2)) + b*b**n*c*n*(a/b + x)**n*le
rchphi(1 + b*x/a, 1, n + 1)*gamma(n + 1)/(a*gamma(n + 2)) - b*b**n*c*n*(a/b + x)**n*gamma(n + 1)/(a*gamma(n +
2)) - b*b**n*c*(a/b + x)**n*gamma(n + 1)/(a*gamma(n + 2)) - b*b**n*d*n*x*(a/b + x)**n*lerchphi(1 + b*x/a, 1, n
 + 1)*gamma(n + 1)/(a*gamma(n + 2)) - b*b**n*d*x*(a/b + x)**n*lerchphi(1 + b*x/a, 1, n + 1)*gamma(n + 1)/(a*ga
mma(n + 2)) - b**2*b**n*c*n**2*(a/b + x)**2*(a/b + x)**n*lerchphi(1 + b*x/a, 1, n + 1)*gamma(n + 1)/(a**2*x*ga
mma(n + 2)) - b**2*b**n*c*n*(a/b + x)**2*(a/b + x)**n*lerchphi(1 + b*x/a, 1, n + 1)*gamma(n + 1)/(a**2*x*gamma
(n + 2))

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (d x + c\right )}{\left (b x + a\right )}^{n}}{x^{2}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^n*(d*x+c)/x^2,x, algorithm="giac")

[Out]

integrate((d*x + c)*(b*x + a)^n/x^2, x)